#include "Server.hpp"
#include "daemon.hpp"
#include <memory>
static void Usage(string proc)
{
    cout << "\nUsage:\n\t" << proc << " local_port\n\n";
}
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        exit(3);
    }
    uint16_t port = atoi(argv[1]);
    unique_ptr<Server> usvr(new Server(port));
    usvr->init();
    daemonSelf();
    usvr->start();
    return 0;
}